﻿using System.Windows.Markup;

namespace RSkor.Common.WinForms
{
    [MarkupExtensionReturnType(typeof(System.Windows.Forms.Control))]
    [ContentProperty("Control")]
    public class ControlExtension : BaseMarkupExtension
    {
        public enum EventType
        {
            BackColorChanged,
            BackgroundImageChanged,
            BackgroundImageLayoutChanged,
            BindingContextChanged,
            CausesValidationChanged,
            ChangeUICues,
            Click,
            ClientSizeChanged,
            ContextMenuChanged,
            ContextMenuStripChanged,
            ControlAdded
        }

        public override object ProvideValue(System.IServiceProvider serviceProvider)
        {
            return Control;
        }

        public System.Windows.Forms.Control Control { get; set; }

        public string ToolTip { get; set; }
    }
}
